package com.gpay.erp.services.common.impl;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

/**
 * Created by wuzonghui on 15/11/11.
 */
public class StringUtil {
    public static String getFormateTime(){
        Calendar calendar = Calendar.getInstance();
        Date date = calendar.getTime();
        DateFormat format1 = new SimpleDateFormat("yyyy-MM-dd");
        String s = format1.format(date);
        return s;
    }

    public static String getFormatNumber(String code) {
        int size = 3-code.length();
        for(int j=0;j<size;j++){
            code="0"+code;
        }
        return code;
    }
}
